package com.gaofei;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author : gaofee
 * @date : 14:44 2020/12/2
 * @码云地址 : https://gitee.com/itgaofee
 */
@SpringBootApplication
@EnableDiscoveryClient//通过 @EnableDiscoveryClient注解表明是一个Nacos客户端
public class ConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
    }
    //方便使用rest调用
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
